<?php


namespace App\Common;
/**
 * 编号格式配置类
 *
 * @package App\Http\Common
 */
class BnFormatConfig
{
    // 商品分类编号
    const CATEGORY_BN_KEY = 'CATEGORY_BN';
    const CATEGORY_BN_FORMAT = ['prefix' => 'C','pad' => 3];

    // 商品品牌编号
    const BRAND_BN_KEY = 'BRAND_BN';
    const BRAND_BN_FORMAT = ['prefix' => 'B','pad' => 3];

    // 订单编号
    const ORDRE_BN_KEY = 'ORDER_BN';
    const ORDER_BN_FORMAT = ['prefix' => 'SO','pad' => 5];

    // 发货单编号
    const DELIVERY_BN_KEY = 'DELIVERY_BN';
    const DELIVERY_BN_FORMAT = ['prefix' => 'D', 'pad' => 7];

    // 商品编号
    const GOODS_BN_KEY = 'GOODS_BN';
    const GOODS_BN_FORMAT = ['prefix' => '8', 'pad' => 7];

    // 会员编号
    const CUSTOMER_BN_KEY = 'CUSTOMER_BN';
    const CUSTOMER_BN_FORMAT = ['prefix' => 'E', 'pad' => 7];

    // 优惠券编号
    const COUPON_BN_KEY = 'COUPON_BN';
    const COUPON_BN_FORMAT = ['prefix' => 'CO', 'pad' => 10];

    // 售后申请单号
    const AFTERSALES_APPLY_BN_KEY = 'APPLY_BN';
    const APPLY_BN_FORMAT = ['prefix' => '50', 'pad' => 7];

    // 支付单编号
    const ORDER_PAY_BN_KEY = 'ORDER_PAY_BN';
    const ORDER_PAY_BN_FORMAT = ['prefix' => '20', 'pad' => 5];

    // 编号配置集合
    const BN_FORMAT_MAP = [
        self::CATEGORY_BN_KEY => self::CATEGORY_BN_FORMAT,
        self::ORDRE_BN_KEY => self::ORDER_BN_FORMAT,
        self::BRAND_BN_KEY => self::BRAND_BN_FORMAT,
        self::DELIVERY_BN_KEY => self::DELIVERY_BN_FORMAT,
        self::GOODS_BN_KEY => self::GOODS_BN_FORMAT,
        self::CUSTOMER_BN_KEY => self::CUSTOMER_BN_FORMAT,
        self::COUPON_BN_KEY => self::COUPON_BN_FORMAT,
        self::AFTERSALES_APPLY_BN_KEY => self::APPLY_BN_FORMAT,
        self::ORDER_PAY_BN_KEY => self::ORDER_PAY_BN_FORMAT
    ];
}
